Sanborns: Keycloak (OpenID) Authentication Integration
Integration Route
Endpoint: /2251799858000009/embeddable-login-ui/
Integration Description
The client Sanborns has a virtual store at {store_final_domain} and the authentication integration is performed through a Keycloak server (documentation) owned by the client. This server is responsible for authenticating users.
To efficiently manage authentication, an OpenID Connect–based integration is implemented.
Authentication Process
- When a user wants to authenticate, the system always redirects to the external form provided by the authentication server.
- Keycloak validates the user's data.
- Once authentication is completed, the system returns with the necessary information to allow the user to access Publica.la.
- Before each authentication, it ensures that there is no active session by forcing the closure of any previous session.
Full Authentication Flow
- The user (guest) enters the store.
- The user presses "Log in".
- Carga de la integración:
- Forces the closure of any existing session.
- Redirects to the external login form and waits for return.
- The user authenticates on the form and returns to the store.
- The integration processes user data verification and validation.
- A JWT is generated with the email and external_id of the user to log in to Publica.la:
- If the user does not exist, a new user is created.
- If the user already exists, it is linked through email and external_id.
- The information is sent via
postMessageto the host containing the iframe:- In the App, the Token is used.
- In Web, it is identified with an Auth Token (documentation).
- The user remains authenticated within the platform.
- If the user decides to log out:
- The session is closed in the store.
- The user can restart the authentication flow if desired.